package model;


import java.util.*;
import java.io.Serializable;

/**
 *  This class maintains a list of CItems
 *  ArrayList is a class from the Java Collections. The 
 *  class CItemList provides a "wrapper" for the ArrayList class 
 *  so that if we change the way that we store data, only the 
 *  CItemList class will need to change 
 * 
 *  @author macleod
 */

public class CItemList implements Serializable {
	
	private static final long serialVersionUID = 7526472295622776147L;
    private List<CItem> list;
    
    /** Creates new CItemList */
    public CItemList() {
       list = new ArrayList<CItem>();
    }
    
    public void addItem(CItem item)
    {
        list.add(item);
    }
    
    public Iterator<CItem> iterator() 
    {
        return list.iterator();
    }
    
    public void removeAll() {
        list.clear();
    }

}
